global class ExWarehouseDetailBatch implements Database.Batchable<SObject>{
    global ExWarehouseDetailBatch() {
    }
    
    global Database.QueryLocator start(Database.BatchableContext BC) {
       
        return Database.getQueryLocator([select Id, dbizdate__c,dproducedate__c,dvalidate__c from ExWarehouse_Detail__c where IsReturnDetail__c != true ]);
    }

    global void execute(Database.BatchableContext BC, List<SObject> s) {
        //
       // Map<Id,ExWarehouse_Detail__c> eMap = new Map<Id,ExWarehouse_Detail__c>();
        List<ExWarehouse_Detail__c> es = (List<ExWarehouse_Detail__c> )s;
        for(ExWarehouse_Detail__c e :es){
            if(e.dbizdate__c != null)e.dbizdate__c = e.dbizdate__c.addDays(1);
            if(e.dproducedate__c != null)e.dproducedate__c = e.dproducedate__c.addDays(1);
            if(e.dvalidate__c != null) e.dvalidate__c = e.dvalidate__c.addDays(1);
        }
               

       update es;
    }
    
    global void finish(Database.BatchableContext BC) {
        
    }
}